From: Martin Stjernholm Date: Sun, 9 Feb 2003 01:44:35 +0000 (+0000) Subject: (c-basic-common-init): Install `c-fill-paragraph' on X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~28400 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9f9f9a2e7060e0be0b5583f48b38731250088a8a;p=emacs.git (c-basic-common-init): Install `c-fill-paragraph' on `fill-paragraph-function'. Although it's not the normal way to call it in a CC Mode buffer it makes a direct call to `fill-paragraph' work better. --- diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2073a4a3371..94eb6fcaea4 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -335,6 +335,12 @@ comment-start-skip "/\\*+ *\\|//+ *" comment-multi-line t) + ;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a + ;; direct call to `fill-paragraph' behaves better. This still + ;; doesn't work with filladapt but it's better than nothing. + (make-local-variable 'fill-paragraph-function) + (setq fill-paragraph-function 'c-fill-paragraph) + ;; Set `require-final-newline' only if we should. (let ((rfn (assq mode c-require-final-newline))) (when rfn